define(() => {
    return function (res, ele) {
        let str = "";
        for (var i = 0; i < res.length; i++) {
            str += `<div class="grid-war" index="${res[i].proId}">
            <div class="imgs">
                <a href="./product_details.html?id=${res[i].proId}">
                    <img src="${res[i].url}" alt="" class="clik">
                </a>
            </div>
            <div class="info-cont">
                <div class="price">
                    <span>￥</span>
                    <em>${res[i].price}</em>
                </div>
                <div class="title">
                    <a href="">
                        <span>${res[i].product_name}</span>
                        <span class="feature">父亲节新品上市</span>
                    </a>
                </div>
                <div class="operate">
                    <a href="">
                        <i class="icon-fon5"></i><em>收藏</em>
                    </a>
                    <a href="##" id="fon5">
                        <i class="icon-fon6"></i><em class = "shop">加入购物车</em>
                    </a>
                </div>
            </div>
        </div>`
        }
        ele.html(str)
    }
})